<?php

	ini_set("soap.wsdl_cache_enabled", "0");
	
	Class Yomm_Package_Manager
	{
		private $wsdl_url = 'http://www.avancecms.ch/packageManager/PackageManager.wsdl';

		private $client = null;

		private $return = null;
		
		public function __construct()
		{
			$this->client = new SoapClient($this->wsdl_url);
			
			/* $this->return = $this->client->sendError($_SERVER['SERVER_NAME'], $_SERVER['SERVER_ADDR'], $message); */
		}
		
		public function getList()
		{
			return $this->client->getList();
		}
		
		public function getPackage($pkg_id)
		{
			if(empty($pkg_id) || !is_numeric($pkg_id))
				return false;
				
			return $this->client->getPackage($pkg_id);
		}
	}